<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:a4j="http://richfaces.org/a4j">
  
<h:body>
	<h:form>
		<p:panel header="MODIFICATION FORM">
			<h:panelGrid columns="1" id="regGrid">
				<h:outputLabel for="city">inser the city that you want to see all availables hotels:</h:outputLabel>
				<p:inputText id="city" value="#{HotelBean.city}" />
				<p:message for="city" />
				<p:commandButton value="Search!!" update="regGrid"	action="#{HotelBean.fillCityHotel()}" />
				
				<h:outputLabel for="id">Id:</h:outputLabel>
				<p:inputText id="id" value="#{HotelBean.hotelId}" />
				<p:message for="id" />
				
				<p:commandButton value="Select the id you want to modify" update="regGrid" />
				
				<h:outputLabel for="id2">#Id:</h:outputLabel>
				<p:inputText id="id2" value="#{HotelBean.hotelId}" />
				<p:message for="id2" />		
				<p:commandButton value="Remove the typed Packet" action="#{HotelBean.remove()}" update="regGrid" />	
			</h:panelGrid>
		</p:panel>
		
			<h:dataTable value="#{HotelBean.cityHotel}" var="item">
    				<h:column>#{item}</h:column>
				</h:dataTable>
		
		
		<h:link outcome="/admin/modifyHotel" value="to Modify " /> <br />
		<h:link outcome="/admin/index" value="HomePage" /> <br />
		
	</h:form>
</h:body>
</html>